home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows Expert
/
Windows Expert.iso
/
windownt
/
perlnt.zip
/
t
/
op
/
time.nt
< prev
next >
Wrap
Text File
|
1993-07-25
|
824b
|
37 lines
#!./perl
# $Header: time.t,v 4.0 91/03/20 01:55:09 lwall Locked $
print "1..4\n";
($beguser,$begsys) = times;
$beg = time;
while (($now = time) == $beg) {}
if ($now > $beg && $now - $beg < 10){print "ok 1\n";} else {print "not ok 1\n";}
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($beg);
($xsec,$foo) = localtime($now);
$localyday = $yday;
if ($sec != $xsec && $mday && $year)
{print "ok 2\n";}
else
{print "not ok 2\n";}
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime($beg);
($xsec,$foo) = localtime($now);
if ($sec != $xsec && $mday && $year)
{print "ok 3\n";}
else
{print "not ok 3\n";}
if (index(" :0:1:-1:365:366:-365:-366:",':' . ($localyday - $yday) . ':') > 0)
{print "ok 4\n";}
else
{print "not ok 4\n";}